package com.goodsogood.union.auth.web.validator;

import com.dongguochao.validation.Validator;
import com.dongguochao.validation.constraints.impl.MobileValidator;
import com.dongguochao.validation.constraints.impl.NotBlankValidator;

/**
 * Created by dongguochao on 17/11/2016.
 */
public class AppPhoneLoginValidator extends Validator {
    @Override
    public void setup() {
        // 手机号验证
        add(new NotBlankValidator("userPhone", "1", "请输入手机号"));
        add(new MobileValidator("userPhone", "1", "请输入正确的手机号"));
        add(new NotBlankValidator("pwd", "1", "请输入密码"));
        add(new NotBlankValidator("plateformDeviceType", "1", "参数不完整：1"));
    }
}
